#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <unordered_map>
#include <algorithm>

using namespace std;

vector<vector<string>> groupAnagrams(vector<string>& strs) {
    vector<vector<string>> ret;
    unordered_map<string, vector<string>> hash;

    for (int i = 0; i < strs.size(); ++i)
    {
        string tmp = strs[i];
        sort(tmp.begin(), tmp.end());
        hash[tmp].push_back(strs[i]);
    }

    for (auto& it : hash)
    {
        ret.push_back(it.second);
    }

    return ret;
}

int main()
{


	return 0;
}